package com;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;

import com.modules.service.FixedDictPostProcessor;
import com.modules.service.StartupRunner;



/**
 * Created by lewis on 2017/5/29.
 */

@SpringBootApplication
//@MapperScan(basePackages="com.*.mapper")
public class App extends SpringBootServletInitializer{



    public static void main(String[] args) {

        SpringApplication.run(App.class, args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(App.class);
    }
    
    
    @Bean
    @Order(2) 
    public StartupRunner startupRunner(){
        return new StartupRunner();
    }
    
    @Bean
    @Order(4) 
    public FixedDictPostProcessor fixedDictPostProcessor() {
    	return new FixedDictPostProcessor();
    }
}